package com.lanyam.travel.base.dao;


import com.lanyam.travel.base.entity.Dictionary;
import com.lanyam.travel.base.entity.vo.DictionaryVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;


@Mapper
public interface DictionaryMapper extends BaseMapper<Dictionary>  {

    /**
     * 分页查询
     */
    Page<DictionaryVo> getPage(@Param("page") IPage<DictionaryVo> page, @Param("map") Map<String, Object> map);

    /**
     * 删除数据
     */
    void delById(String id);

    /**
     * 根据字典类型查询列表
     * @param dictType
     * @return
     */
    List<DictionaryVo> getListByType(@Param("dictType") String dictType);

    /**
     * 根据字典编码获取数据条数
     * @param dictCode
     * @return
     */
    int getCountByDictCode(@Param("dictCode") String dictCode);
}